/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import List from '@ohos.util.List';
import HashSet from '@ohos.util.HashSet';
import { TurboModule } from './TurboModule';
export interface TurboModuleRegistry {

  /**
   * Return the TurboModule instance that has that name `moduleName`. If the `moduleName`
   * TurboModule hasn't been instantiated, instantiate it. If no TurboModule is registered under
   * `moduleName`, return null.
   */
  getModule?(moduleName: string): TurboModule;

  /** Get all instantiated TurboModules. */
  getModules(): HashSet<TurboModule>;

  /** Has the TurboModule with name `moduleName` been instantiated? */
  hasModule(moduleName: string): boolean;

  /**
   * Return the names of all the NativeModules that are supposed to be eagerly initialized. By
   * calling getModule on each name, this allows the application to eagerly initialize its
   * NativeModules.
   */
   getEagerInitModuleNames(): List<string>;
}
